﻿
@{
    ViewBag.Title = "GongZuoJiHuaWanCheng";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@*<script src="~/Scripts/jquery-3.3.1.js"></script>*@
<!--引入CSS-->
<link rel="stylesheet" type="text/css" href="~/webuploader/webuploader.css">
<!--引入JS-->
<script type="text/javascript" src="~/webuploader/webuploader.js"></script>
<!--SWF在初始化的时候指定，在后面将展示-->
<div id="app" class="row">
    <div class="col-lg-12">
        <div class="row" id="list">
            <div class="col-lg-12">
                <table id="dynamic-table" class="table table-striped table-bordered table-hover">
                    <thead>
                        <tr>
                            <th class="center">
                                名称
                            </th>
                            <th>创建时间</th>
                            <th>所属时间</th>
                            <th>状态</th>
                            <th></th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr v-for="tr in khblst">
                            <td class="center">
                                {{tr.mkhbmc}}
                            </td>
                            <td>
                                {{tr.cjsjstr}}
                            </td>
                            <td>
                                {{tr.sssjstr}}
                            </td>
                            <td>
                                <template v-if="tr.khbzt==1">
                                    创建完成
                                </template>
                                <template v-if="tr.khbzt==2">
                                    编辑中
                                </template>
                                <template v-if="tr.khbzt==3">
                                    提交审核
                                </template>
                                <template v-if="tr.khbzt==4">
                                    通过审核
                                </template>
                                <template v-if="tr.khbzt==5">
                                    生成考核表
                                </template>
                            </td>
                            <td>

                                <div class="btn-group" v-if="tr.khbzt==3||tr.khbzt==4">
                                    <button data-toggle="dropdown" class="btn btn-primary btn-white dropdown-toggle btn-sm">
                                        操作
                                        <i class="ace-icon fa fa-angle-down icon-on-right"></i>
                                    </button>

                                    <ul class="dropdown-menu">
                                        <li>
                                            <a href="#" v-on:click="p_Edit(tr)">完成情况</a>
                                        </li>
                                        <li>
                                            <a href="#" v-on:click="p_YueGongZuo(tr)">月工作总结</a>
                                        </li>
                                    </ul>
                                </div><!-- /.btn-group -->
                            </td>

                        </tr>

                    </tbody>
                </table>
            </div>
        </div>

        <div class="row" id="info" style="display: none">
            <div class="col-xs-12  widget-container-col">
                <!-- #section:custom/widget-box -->
                <div class="widget-box">
                    <div class="widget-header">
                        <h5 class="widget-title">编辑区</h5>

                        <!-- #section:custom/widget-box.toolbar -->
                        <div class="widget-toolbar">
                            <div class="widget-menu">
                                <a href="#" data-action="settings" data-toggle="dropdown">
                                    <i class="ace-icon fa fa-bars"></i>
                                </a>

                                <ul class="dropdown-menu dropdown-menu-right dropdown-light-blue dropdown-caret dropdown-closer">
                                    <li>
                                        <a data-toggle="tab" href="#dropdown1" v-on:click="ShowList()">返回列表</a>
                                    </li>

                                </ul>
                            </div>


                        </div>

                        <!-- /section:custom/widget-box.toolbar -->
                    </div>

                    <div class="widget-body">
                        <div class="widget-main">
                            <div class="form-horizontal" role="form">
                                <div class="row">
                                    <div class="col-xs-5">
                                        <div class="input-group">
                                            <span class="input-group-addon">
                                                工作计划名称：
                                            </span>
                                            <input type="text" class="form-control search-query" placeholder="工作计划名称" readonly="readonly" v-bind:value="khbinfo.xingming+khbinfo.mkhbmc" />

                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <table class="table  table-bordered table-hover">
                                        <thead class="thin-border-bottom">
                                            <tr>
                                                <th>
                                                    名称
                                                </th>
                                                <th>单项分值</th>
                                            </tr>
                                        </thead>

                                        <tbody>
                                            <template v-for="tr in khbinfo.MyKaoHeBiaoOnes">
                                                <tr>
                                                    <td>
                                                        {{tr.mbnr}}
                                                    </td>

                                                    <td>
                                                        {{tr.fz}}
                                                    </td>
                                                </tr>
                                                <tr class="detail-row open">
                                                    <td colspan="2">
                                                        <div class="table-detail">
                                                            <div class="row">
                                                                <div class="col-xs-12">
                                                                    <p>
                                                                        <span class="label label-xlg label-primary arrowed arrowed-right">包含子项</span>

                                                                    </p>
                                                                    <table class="table table-striped table-bordered table-hover no-margin-bottom no-border-top">
                                                                        <thead>
                                                                            <tr>
                                                                                <th style="width: 350px">名称</th>
                                                                                <th style="width: 400px">工作完成情况(佐证材料)</th>
                                                                                <th style="width: 150px">预计完成时间</th>
                                                                                <th style="width: 20px">分值</th>
                                                                                <th style="width: 40px">自评</th>
                                                                                <th>附件</th>
                                                                            </tr>
                                                                        </thead>
                                                                        <tbody>
                                                                            <tr v-for="son in tr.MyKaoHeBiaoTwos">
                                                                                <td>
                                                                                    {{son.mbnr}}
                                                                                </td>
                                                                                <td>
                                                                                    <div class="input-group">
                                                                                        <input style="width: 400px" class="form-control input-mask-date input-lg" type="text" v-model="son.gzjhwcqk" />
                                                                                    </div>
                                                                                </td>
                                                                                <td>
                                                                                    {{son.gzjhwcsjstr}}
                                                                                </td>
                                                                                <td>
                                                                                    {{son.fz}}
                                                                                </td>
                                                                                <td>
                                                                                    <div class="input-group">
                                                                                        <input style="width: 40px" class="form-control input-mask-date" type="text" v-model="son.zp" />
                                                                                    </div>
                                                                                </td>
                                                                                <td>
                                                                                    <a href="javascript:void(0)" v-on:click="ShowLinShiGongZuo(son.twoid,$event)">查看附件</a>
                                                                                    <template v-if="son.Iswc==false">
                                                                                        <button class="btn btn-white btn-primary btn-bold btn-sm" type="button" v-on:click="updatewczt(son,true)">
                                                                                            <i class="ace-icon fa fa-lock bigger-120"></i>
                                                                                            完成
                                                                                        </button>
                                                                                    </template>
                                                                                    <template v-else>
                                                                                        <button class="btn btn-white btn-warning btn-bold btn-sm" type="button" v-on:click="updatewczt(son,false)">
                                                                                            <i class="ace-icon fa fa-unlock  bigger-120"></i>
                                                                                            撤销至未完成
                                                                                        </button>
                                                                                    </template>
                                                                                </td>
                                                                            </tr>
                                                                        </tbody>
                                                                    </table>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </td>
                                                </tr>
                                            </template>
                                        </tbody>
                                    </table>
                                </div>
                                <div class="clearfix form-actions">
                                    <div class="col-md-offset-1 col-md-11">
                                        <button class="btn btn-white btn-info btn-bold" type="button" v-on:click="p_Save()">
                                            <i class="ace-icon fa fa-floppy-o bigger-120 blue"></i>
                                            保存
                                        </button>


                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- /section:custom/widget-box -->
            </div>
            <!-- /.span -->
        </div><!-- /.row -->
        <!--弹出框-->
        <div class="row">
            <div class="col-xs-12">
                <div id="dialog-linshigongzuo" class="hide">
                    <div class="row">
                        <div class="col-xs-12">
                            <div class="form-horizontal" role="form">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right"> 标题 </label>
                                    <div class="col-sm-9">
                                        <textarea class="form-control" placeholder="标题" style="width: 350px" id="uploadtitle"></textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right">  </label>
                                    <div class="col-sm-9">
                                        <div id="uploader" class="wu-example">
                                            <!--用来存放文件信息-->
                                            <ul id="thelist" class="list-group"></ul>
                                            <div class="uploader-list"></div>
                                            <div class="btns">
                                                <div id="picker" style="float: left;">选择文件</div>
                                                <input id="ctlBtn" type="button" value="开始上传" class="btn btn-default" style="width: 78px; height: 37px; margin-left: 10px;" />
                                            </div>
                                        </div>
                                    </div>

                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-xs-12">
                            <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                                <thead>
                                    <tr>
                                        <th class="center">
                                            附件
                                        </th>
                                        <th>标题</th>
                                        <th></th>
                                    </tr>
                                </thead>

                                <tbody>
                                    <tr v-for="tr in uploaderfiles">
                                        <td class="center">
                                            <a v-bind:href="tr.path" target="_blank"><img width="50" height="50" v-bind:src="tr.path" /></a>
                                        </td>
                                        <td>{{tr.fjmc}}</td>
                                        <td><a href="javascript:void(0)" v-on:click="DelFile(tr.fjid)">删除</a></td>
                                    </tr>
                                </tbody>
                            </table>
                        </div><!-- /.span -->
                    </div><!-- /.row -->


                </div><!-- #dialog-message -->
            </div>
        </div>
        <!--月工作总结-->
        <div class="row">
            <div class="col-xs-12">
                <div id="dialog-gongzuozongjie" class="hide">
                    <div class="row" id="gzzjlist">
                        <div class="col-xs-12">
                            <p>
                                <button class="btn btn-white btn-info btn-bold" v-on:click="p_AddGZZJ()">
                                    <i class="ace-icon glyphicon glyphicon-plus bigger-120 blue"></i>
                                    新增
                                </button>

                            </p>
                            <div class="widget-box" v-for="tr in yuezjlist.Zongjietwos">
                                <div class="widget-header widget-header-flat">
                                    <h4 class="widget-title smaller">{{tr.zongjielxstr}}</h4>
                                    <div class="widget-toolbar">
                                        <label>
                                            <button class="btn btn-white btn-warning btn-bold" v-on:click="p_DelGongZuoZongJie(tr.zjtowid)">
                                                <i class="ace-icon fa fa-trash-o bigger-120 orange"></i>
                                                删除
                                            </button>
                                            <span class="lbl middle"></span>
                                        </label>
                                    </div>
                                </div>
                                <div class="widget-body">
                                    <div class="widget-main">
                                        {{tr.zongjienr}}
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div id="gzzjinfo" class="row" style="display: none">
                        <div class="col-xs-12">

                            <div>
                              
                                <div>
                                    <label>工作总结类型</label>
                                    <select class="form-control" v-model="zongjie.zongjielx">
                                        <option value="1">工作总结 </option>
                                        <option value="2">工作亮点 </option>
                                        <option value="3">工作不足 </option>
                                        <option value="4">所需支持与建议 </option>
                                        <option value="5">下月工作计划 </option>
                                    </select>
                                </div>
                                <div>
                                    <label>内容</label>
                                    <textarea class="form-control" placeholder="内容" v-model="zongjie.zongjienr"></textarea>
                                </div>
                            </div>
                            <hr/>
                            <p>
                                <button class="btn btn-white btn-default btn-round" v-on:click="p_fanHui()">
                                    <i class="ace-icon fa fa-reply icon-only red2"></i>
                                    返回
                                </button>
                                <button class="btn btn-white btn-info btn-bold" v-on:click="p_SaveGongZuoZhongJie()">
                                    <i class="ace-icon fa fa-floppy-o bigger-120 blue"></i>
                                    保存
                                </button>
                            </p>
                        </div>
                    </div>
                </div><!-- #dialog-message -->
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
</script>
<script src="~/Template/ace_admin_v1.4.0/components/jquery.maskedinput/src/jquery.maskedinput.js"></script>
<script src="~/Scripts/JsModel/Model_KaoHeBiao.js"></script>
<script type="text/javascript">
    //$(document).ready(function () {
    //    $('.input-mask-date').mask('9999/99/99');
    //});

    var vm = new Vue(
        {
            el: "#app",
            data: {
                khblst: [],
                khbinfo: new KaoHeBiao(),
                applicationPath: "",
                GUID: "",
                files: [],
                twoid: 0,
                uploaderfiles: [],
                uploaderobj: {},
                yuezjlist: new zongjieone(),
                zongjie: new zongjietwo(),
                zongjieleixings:[]
            },
            filter() {

            },
            mounted() {

                this.initPage();
            },
            methods: {
                initPage: function () {
                    var _self = this;
                    _self.applicationPath = window.applicationPath === "" ? "" : window.applicationPath || "../../";
                    _self.p_Gets();
                    _self.UploaderInit();
                },
                UploaderInit: function () {
                    var _self = this;
                    _self.GUID = WebUploader.Base.guid();//一个GUID
                    var $list = $('#thelist');
                    var uploader = WebUploader.create({
                        // 选完文件后，是否自动上传。
                        auto: false,
                        // swf文件路径
                        swf: _self.applicationPath + '/webuploader/Uploader.swf',
                        // 文件接收服务端。
                        server: _self.applicationPath + '/Upload/Upload',
                        // 选择文件的按钮。可选。
                        // 内部根据当前运行是创建，可能是input元素，也可能是flash.
                        pick: '#picker', chunked: true,
                        //开始分片上传
                        chunkSize: 2048000,
                        //每一片的大小
                        formData: {
                            guid: _self.GUID
                            //自定义参数，待会儿解释
                        },
                        // 不压缩image, 默认如果是jpeg，文件上传前会压缩一把再上传！
                        resize: false
                    }); // 当有文件被添加进队列的时候
                    _self.uploaderobj = uploader;
                    uploader.on('fileQueued',
                        function (file) {
                            $list.append('<li id="' +
                                file.id +
                                '" class="list-group-item">' +
                                '<span class="fileName" dataValue="">' +
                                file.name +
                                '</span>' +
                                '<span class="state"  style=\" margin-left: 10px;\">等待上传</span>' +
                                '<span class="filepath" dataValue="0" style=\" margin-left: 10px;display: none;\"></span>' +
                                '<span class="download" style="margin-left:20px;"></span>' +
                                '<span class="webuploadDelbtn" style=\"float: right;display: none; \">删除<span>' +
                                '</li>');
                        });
                    // 文件上传过程中创建进度条实时显示。
                    uploader.on('uploadProgress', function (file, percentage) {
                        var $li = $('#' + file.id), $percent = $li.find('.progress .progress-bar');
                        // 避免重复创建
                        if (!$percent.length) {
                            $percent = $('<div class="progress progress-striped active">' + '<div class="progress-bar" role="progressbar" style="width: 0%">' + '</div>' + '</div>').appendTo($li).find('.progress-bar');
                        }
                        $li.find('span.state').text('上传中');
                        $percent.css('width', percentage * 100 + '%');
                    });
                    // 文件上传成功，给item添加成功class, 用样式标记上传成功。
                    uploader.on('uploadSuccess', function (file, response) {
                        var $li = $('#' + file.id);
                        file.name = response.name;
                        //$('#' + file.id).find('p.state').text('已上传');
                        var uploadtitle = $("#uploadtitle").val();
                        if (uploadtitle) {
                            $.post("@Url.Action("UploadFile", "MyCaoZuo")",
                                {
                                    guid: _self.GUID,
                                    fileName: file.name,
                                    filePath: response.filepath,
                                    uploadtitle: uploadtitle,
                                    mkhbid: _self.khbinfo.mkhbid,
                                    twoid: _self.twoid,
                                    uploadfileHash: response.uploadfileHash
                                },
                                function(data) {
                                    $li.find('span.state').html("上传成功");
                                    //$li.find('span.filepath').attr("dataValue", 1);
                                    //$li.find('span.fileName').attr("dataValue", data.filename);
                                    //$li.find('span.fileName').html(data.filename);
                                    //$li.find('span.download').html("<a href=" +
                                    //    data.filepath +
                                    //    "/" +
                                    //    data.filename +
                                    //    " target=\"_blank\" >下载</a>");
                                    //$li.find('span.webuploadDelbtn').show();
                                    //$li.find('span.filepath').html(data.filepath);
                                    //增加列表存储
                                    _self.files.push(data);
                                    bootbox.alert("上传成功",
                                        function() {
                                            _self.GetFileList(_self.khbinfo.mkhbid, _self.twoid);
                                        });
                                });
                        } else {
                            //
                        }

                    });
                    // 文件上传失败，显示上传出错。
                    uploader.on('uploadError', function (file, reason) {
                        $('#' + file.id).find('p.state').text(reason);
                    });
                    // 完成上传完了，成功或者失败，先删除进度条。
                    uploader.on('uploadComplete', function (file) {
                        $('#' + file.id).find('.progress').fadeOut();
                    });
                    //所有文件上传完毕
                    uploader.on("uploadFinished", function () {
                        //提交表单
                    });
                    //开始上传
                    $("#ctlBtn").click(function () {
                        var uploadtitle = $("#uploadtitle").val();
                        if (uploadtitle) {
                            uploader.upload();
                        } else {
                            bootbox.alert("请输入标题");
                        }

                    });
                    //删除
                    $list.on("click", ".webuploadDelbtn", function () {
                        var $ele = $(this); var
                            id = $ele.parent().attr("id");
                        var file = uploader.getFile(id);
                        uploader.removeFile(file);
                        $ele.parent().remove();
                        //移除数组
                        var destFile = findFile(file.name);
                        var index = _self.files.indexOf(destFile);
                        if (index > -1) {
                            _self.files.splice(index, 1);
                        }
                    });
                },
                p_OpenModal: function (e) {
                    var _self = this;
                    e.preventDefault();
                    var dialog = dialog_comm(true,"dialog-message", "创建工作计划", null, function () { _self.p_Create(); }, true);
                },
                ShowInfo: function () {
                    $("#list").hide(function () {
                        $("#info").show();
                    });
                },
                ShowList: function () {
                    $("#info").hide(function () {
                        $("#list").show();
                    });
                },
                p_Edit: function (obj) {
                    var _self = this;
                    _self.p_Get(obj.mkhbid);
                    _self.ShowInfo();
                },
                p_YueGongZuo: function (obj) {
                    ///<summary>显示月工作总结</summary>
                    var _self = this;
                    _self.khbinfo = new KaoHeBiao(obj);
                    let data = {"khbid":obj.mkhbid};
                    axios.post('@Url.Action("getYueGongZuoZongJie", "MyCaoZuo")', data).then(
                            function(response) {
                                _self.yuezjlist = response.data;
                            },
                            function(response) {
                                //alert(response.status);
                            }
                        )
                        .catch(
                            function(error) {
                                //alert(error);
                            }
                        );
                    var dialog = dialog_comm(false, "dialog-gongzuozongjie", "月工作总结", null, function() {}, true, 800);
                },
                p_DelGongZuoZongJie(zjid) {
                    ///<summary>删除工作总结</summary>
                    var _self = this;
                    let data = {"khbid":_self.khbinfo.mkhbid,"zjid":zjid};
                    bootbox.confirm("你确定这个操作吗?",
                        function(result) {
                            if (result) {
                                axios.post('@Url.Action("delGongZuoZongJie", "MyCaoZuo")', data)
                                    .then(
                                        function(response) {
                                            _self.p_YueGongZuo(_self.khbinfo);
                                        },
                                        function(response) {
                                            //alert(response.status);
                                        }
                                    )
                                    .catch(
                                        function(error) {
                                            //alert(error);
                                        }
                                    );
                            }
                        });
                },
                p_SaveGongZuoZhongJie() {
                    ///<summary>保存工作总结</summary>
                    var _self = this;
                    let data = {"model":_self.zongjie,"khbid":_self.khbinfo.mkhbid};
                    axios.post('@Url.Action("saveGongZuoZongJie", "MyCaoZuo")',data).then(
                            function(response) {
                            _self.p_fanHui();
                            _self.p_YueGongZuo(_self.khbinfo);
                            },
                            function(response) {
                                //alert(response.status);
                            }
                        )
                        .catch(
                            function(error) {
                                //alert(error);
                            }
                        );
                },
                p_AddGZZJ: function() {
                    //显示添加界面
                    //_self.khbinfo
                    $("#gzzjlist").hide($("#gzzjinfo").show());
                },
                p_fanHui: function () {
                    var _self = this;
                    $("#gzzjinfo").hide($("#gzzjlist").show());
                    _self.zongjie = new zongjietwo();
                },
                p_Create: function() {
                    var _self = this;
                    var sssj = $("#sssj").val();
                    axios.get("@Url.Action("CreateMyKaoHeBiao", "MyCaoZuo")", { params: { sssj: sssj } }).then(
                        (response) => {
                            bootbox.alert("创建成功");
                            _self.p_Gets();
                        },
                        (response) => {

                        }
                    ).catch(function(response) {
                        console.log(response);
                    });
                },
                p_Del: function(khbid) {
                    var _self = this;
                    bootbox.confirm("你确定这个操作吗?",
                        function(result) {
                            if (result) {
                                axios.get("@Url.Action("DelMyKaoHeBiao", "MyCaoZuo")", { params: { khbid: khbid } })
                                    .then(
                                        (response) => {
                                            bootbox.alert("删除成功");
                                            _self.p_Gets();
                                        },
                                        (response) => {

                                        }
                                    ).catch(function(response) {
                                        console.log(response);
                                    });
                            }
                        });
                },
                p_Gets: function() {
                    var _self = this;
                    axios.get("@Url.Action("GetMyKaoHeBiaos", "MyCaoZuo")").then((response) => {
                        _self.khblst = [];
                            for (var i = 0; i < response.data.length; i++) {
                                _self.khblst.push(response.data[i]);
                            }
                        },
                        (response) => {

                        }
                    ).catch(function(response) {
                        console.log(response);
                    });
                },
                p_Get: function (khbid) {
                    var _self = this;
                    axios.get("@Url.Action("GetMyKaoHeBiaoInfo", "MyCaoZuo")", { params: { khbid: khbid } }).then((response) => {
                        _self.khbinfo = new KaoHeBiao(response.data);
                            debugger;
                        },
                        (response) => {

                        }
                    ).catch(function(response) {
                        console.log(response);
                    });
                },
                p_DelTwo: function(pobj,obj) {
                    var _self = this;
                    var index = -1;
                    $(pobj.MyKaoHeBiaoTwos).each(function(i,item) {
                        if (item.mbnr == obj.mbnr) {
                            index = i;
                        }
                    });
                    if (index > -1) {
                        pobj.MyKaoHeBiaoTwos.splice(index, 1);
                    }
                },
                p_AddTwo: function (obj) {
                    var tmp = new MyKaoHeBiaoTwo();
                    tmp.IsEdit = true;
                    obj.MyKaoHeBiaoTwos.push(tmp);
                    //this.inputdatetimeformat();
                },
                p_Save: function() {
                    var _self = this;
                    axios.post('@Url.Action("UpdateMyKaoHeBiao", "MyCaoZuo")', _self.khbinfo).then(
                            function(response) {
                                bootbox.alert("成功",
                                    function() {
                                        _self.ShowList();
                                        _self.p_Gets();
                                    });
                                //vm.goodsList.splice(response.data.length);
                            },
                            function(response) {
                                //alert(response.status);
                            }
                        )
                        .catch(
                            function(error) {
                                //alert(error);
                            }
                        );
                },
                p_TiJiaoShenHe: function(khbid) {
                    var _self = this;
                    bootbox.confirm("你确定这个操作吗?",
                        function(result) {
                            if (result) {
                                axios.get("@Url.Action("UpdateTiJiaoMyKaoHeBiao", "MyCaoZuo")", { params: { khbid: khbid } }).then((response) => {
                                        bootbox.alert("提交成功");
                                        _self.p_Gets();
                                    },
                                    (response) => {

                                    }
                                ).catch(function(response) {
                                    console.log(response);
                                });
                            }
                        });
                },
                inputdatetimeformat: function (event) {
                    //var el = event.currentTarget;
                    $(".input-mask-date").mask('9999-99-99');
                },
                ShowLinShiGongZuo: function (twoid,e) {
                    var _self = this;
                    var dialog = dialog_comm(false, "dialog-linshigongzuo", "上传附件", null, function () { }, true,600);
                    _self.twoid = twoid;
                    _self.GetFileList(_self.khbinfo.mkhbid, _self.twoid);
                    e.preventDefault();
                    _self.uploaderobj.refresh();//刷新容器
                },
                GetFileList: function (mkhbid, twoid) {
                    var _self = this;
                    axios.get("@Url.Action("GetFileList", "MyCaoZuo")", { params: { mkhbid: mkhbid, twoid: twoid } })
                        .then((response) => {
                                _self.uploaderfiles = [];
                                for (var i = 0; i < response.data.length; i++) {
                                    _self.uploaderfiles.push(new MyKaoHeBiaoTwoFuJian(response.data[i]));
                                }
                            },
                            (response) => {

                            }
                        ).catch(function(response) {
                            console.log(response);
                        });
                },
                DelFile: function(fjid) {
                    var _self = this;
                    bootbox.confirm("你确定这个操作吗?",
                        function(result) {
                            if (result) {
                                axios.get("@Url.Action("DelFile", "MyCaoZuo")",
                                    { params: { mkhbid: _self.khbinfo.mkhbid, twoid: _self.twoid, fjid: fjid } }).then(
                                    (response) => {
                                        bootbox.alert("删除成功", function() {
                                            _self.GetFileList(_self.khbinfo.mkhbid, _self.twoid);
                                        });
                                    },
                                    (response) => {

                                    }
                                ).catch(function(response) {
                                    console.log(response);
                                });
                            }
                        }
                    );
                },
                updatewczt(obj,flag) {
                    var _self = this;
                    bootbox.confirm("你确定这个操作吗?",
                        function(result) {
                            if (result) {
                                axios.get("@Url.Action("updatewczt", "MyCaoZuo")",
                                    { params: { khbid: _self.khbinfo.mkhbid, twoid: obj.twoid, flag: flag } }).then(
                                    (response) => {
                                        obj.Iswc = flag;
                                    },
                                    (response) => {

                                    }
                                ).catch(function(response) {
                                    console.log(response);
                                });
                            }
                        }
                    );
                }
            }
        });
</script>